#include <iostream>
#include <fstream>
#include <cstdlib>
using namespace std;
const int size=60;
int main()
{
    char fileName[size];
    ifstream infile;
    cin.getline(fileName, size);
    infile.open(fileName);
    if(!infile.is_open()) exit(EXIT_FAILURE);

    double value;
    double sum=0.0;
    int count=0;
    while(infile.good())
    {
        infile>>value;
        count++;
        sum+=value;
        cout<<value<<endl;
        if(infile.eof()) break;
    }
    if(infile.eof()) cout<<"end of file"<<endl;
    else if (infile.fail()) cout<<"failure"<<endl;
    else cout<<"fail"<<endl;
    if(count==0) cout<<"no data processed"<<endl;
    else 
    {
        cout<<"sum:"<<sum<<endl;
        cout<<"count:"<<count<<endl;
        cout<<"average:"<<sum/count<<endl;
    }

    return 0;
}